[PATCH] [PowerPC] Indicate that PPC32PICGOT clobbers LR (#154654)
authorJosh Stone <jistone@redhat.com>
Mon, 25 Aug 2025 22:31:27 +0000 (15:31 -0700)
committerMatthias Klose <doko@debian.org>
Sat, 8 Nov 2025 13:36:04 +0000 (14:36 +0100)
commitec42d397570e5122d1a806c30e516b7c30130398
tree0e37b684d077052619d8e8c9b6f019958d48efdc
parent7c82389abb918826d09cfb6b3667e9db85d52f8c
[PATCH] [PowerPC] Indicate that PPC32PICGOT clobbers LR (#154654)

This pseudo-instruction emits a local `bl` writing LR, so that must be
saved and restored for the function to return to the right place. If
not, we'll return to the inline `.long` that the `bl` stepped over.

This fixes the `SIGILL` seen in rayon-rs/rayon#1268.

Gbp-Pq: Name powerpc-fix-SIGILL.diff
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/tls-picgot.ll [new file with mode: 0644]